UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'unbUORZqmq4Z96afZLUYkWT5tMqSKnlHomBEt4N5Ckc='
WHERE
key_id = 'c0bec6a19e0c5d3d1bcac7dc11b30ed13c7e351066ec921a957fb549cfbaf51b'
AND (
token = 'unbUORZqmq4Z96afZLUYkWT5tMqSKnlHomBEt4N5Ckc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)