UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5ckf4MG10BiJzOjfla/ZJlTrFhuSMFTvZVrOaCZE/HA='
WHERE
key_id = '07fd800962d9d99d97ab755ae7344dcfbb6faba8710a9bee7abaa2ae16a265f2'
AND (
token = '5ckf4MG10BiJzOjfla/ZJlTrFhuSMFTvZVrOaCZE/HA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)