UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '27fC3p49OPziFLFp0ky/PPGxPd58z5OkW/JDVTrOKiM='
WHERE
key_id = '1611364bd8a014c272a45418150be46083b4e4d0a4224c60df9bd2f6b2ab5cb9'
AND (
token = '27fC3p49OPziFLFp0ky/PPGxPd58z5OkW/JDVTrOKiM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)