UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U/3DfRsoc0DC8G7AaGVsMt/IR0rE+m4pvVJKmcQr+CM='
WHERE
key_id = '968fc456ee4d126db7412ac5710c048f567b084d1d18af6d87545fc7c47338fd'
AND (
token = 'U/3DfRsoc0DC8G7AaGVsMt/IR0rE+m4pvVJKmcQr+CM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)