UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2rc3KjMOvaLy4mIJzNUV63/b12l4ryPifLr4GkLsLNo='
WHERE
key_id = '35325064f80e6aeda678702b7f6b6db1daa059fdbe62e45a3844f7ce9968c896'
AND (
token = '2rc3KjMOvaLy4mIJzNUV63/b12l4ryPifLr4GkLsLNo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)