UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4luJpOzjZPoGN7FxPS/WM1EjeuvMx2T7U4Unjjx6k2M='
WHERE
key_id = '22d039c0921ae9ddfb903070ec6567ee594da6580a82bec1b7bea184c44297bc'
AND (
token = '4luJpOzjZPoGN7FxPS/WM1EjeuvMx2T7U4Unjjx6k2M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)