UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UHkljGuyKjJXqfAp1AYq/57U9oUz2tuBpNnAwDQRREo='
WHERE
key_id = '5900b15d57dcb91672388b58474422a3b4fd0060e2fc95cb3d88bade21af065f'
AND (
token = 'UHkljGuyKjJXqfAp1AYq/57U9oUz2tuBpNnAwDQRREo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)