UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5zzMrQMzcvOkF9P2jBq2Uh1+RHbb30KbLvQknLApj1A='
WHERE
key_id = '5547443e3dde880263a7112cd72ecec277adb0612bea3c0421318ceef492e837'
AND (
token = '5zzMrQMzcvOkF9P2jBq2Uh1+RHbb30KbLvQknLApj1A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)