UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2ySwM+9meyL11K1+7b0L/GUwN5sT/54YxcyGvDSH1xM='
WHERE
key_id = '83018ceb35ea9f8d6c625d9c09cae434a35f7f5309200b9e3257a1e3e2a73b55'
AND (
token = '2ySwM+9meyL11K1+7b0L/GUwN5sT/54YxcyGvDSH1xM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)