UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Z+Gp4liSl0/TbvlsdJ5g6s7QoOHz9gnvpQwTeoi67JI='
WHERE
key_id = '72a4d91325d2debcae9b6e8382612056b3680d32091fd2a843aca1b49d385502'
AND (
token = 'Z+Gp4liSl0/TbvlsdJ5g6s7QoOHz9gnvpQwTeoi67JI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)