UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kRRjK/5289VJC2fF/o8JWORfwleGJWGS3o2fQyvmnmc='
WHERE
key_id = '29912e96290b731c14aa30368e623fb3b3ff17c265557563ef8571797260fa7f'
AND (
token = 'kRRjK/5289VJC2fF/o8JWORfwleGJWGS3o2fQyvmnmc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)