UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FLL4pt29sVYZoumti6UF/ODEakRaE3usQB0ASo0GVM0='
WHERE
key_id = '84c3224851e44cba026b4d36e5e856495f0411986f84beaa164ba70b9bc109fd'
AND (
token = 'FLL4pt29sVYZoumti6UF/ODEakRaE3usQB0ASo0GVM0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)