UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hx8Kf0wnYKtGkM0fnfDmxgBiZUHbchgmMiDuK8whGdI='
WHERE
key_id = '99992686994036be3e32ac7fbfcf2ba85865b68b78855ca00a056a5640a688f5'
AND (
token = 'hx8Kf0wnYKtGkM0fnfDmxgBiZUHbchgmMiDuK8whGdI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)