UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oD4ZHVeruRwjpSbZ3Bhj/szjUelklj9PX0gNQIlFHok='
WHERE
key_id = '37b054ac84d1cf019775b9ca952c01d960d314ba61ac9777248331ab7fdccf42'
AND (
token = 'oD4ZHVeruRwjpSbZ3Bhj/szjUelklj9PX0gNQIlFHok='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)