UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9WadNjJ84tauh00rjBGLrzMLRVMwA9TwmxOziU4/VUU='
WHERE
key_id = '9b9373031568f007d2ccba63a92b41ed7f55470d590f566104e4a31d14472dde'
AND (
token = '9WadNjJ84tauh00rjBGLrzMLRVMwA9TwmxOziU4/VUU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)