UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1ti5mp5mtrvDMm2nCOymyIiRSV8j9D7biSfxeZZMm/0='
WHERE
key_id = '889cb8f90d39ef7bd3c4dd4744204b13c7d51ae2dc6acebc947f7deebe2e5e33'
AND (
token = '1ti5mp5mtrvDMm2nCOymyIiRSV8j9D7biSfxeZZMm/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)