UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ffVeFuiLp8ZlXOGjMCjxVbLW3CvL/Y52A20paoR19xs='
WHERE
key_id = '25e7d7927d6fb2402e8b7bdadc68a94c38f30576b4752bd70204613e6ebec994'
AND (
token = 'ffVeFuiLp8ZlXOGjMCjxVbLW3CvL/Y52A20paoR19xs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)