UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'c/lijkbOTOnVVcqdkDkzZFDS8B+WUpzhHnowRchAbLU='
WHERE
key_id = '4b1195568c33a28ae0a5579da28c37c59eb588f825fa9d382785093403fae97c'
AND (
token = 'c/lijkbOTOnVVcqdkDkzZFDS8B+WUpzhHnowRchAbLU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)