UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bbFkv1tq4s/I71nbSS+sj5+GsuGuTGgKTYN3dBL8SKM='
WHERE
key_id = 'cbf4032393e8f9e04085f7595df3d366984f298f7769a82e28f5f04c8a89b93c'
AND (
token = 'bbFkv1tq4s/I71nbSS+sj5+GsuGuTGgKTYN3dBL8SKM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)