UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VXWCK+Ivz/WNt64mP42e6ybcxR0CNZJO2Honv3vZTYU='
WHERE
key_id = '2c2ee366df4e379d3185072d86ad15dae810202710fb295a5fbab15c6de9542f'
AND (
token = 'VXWCK+Ivz/WNt64mP42e6ybcxR0CNZJO2Honv3vZTYU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)