UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FL/BGUrSukU2425X3ThNARMiOkdSV27l7hNstwq8w9U='
WHERE
key_id = '9d28398b1189e26ed895e622e115182d14497eca531ddcfd458add3d351a52dc'
AND (
token = 'FL/BGUrSukU2425X3ThNARMiOkdSV27l7hNstwq8w9U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)