UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '42T3pF4moGQihrxpBFGHTQajBBw2/pp7kYSmIbTzRA0='
WHERE
key_id = 'ea56f5469dd9a7facaa43f1c8f6fb5658447d8cd46f4cd790db7fb09ec61141d'
AND (
token = '42T3pF4moGQihrxpBFGHTQajBBw2/pp7kYSmIbTzRA0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)