UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lqs0jOElyr4zuhwvxL9FQXD1SHRK4IBsQv7yqSAqd28=' 
WHERE 
  key_id = '804c2279d2918e490f1dd6c05af4ff415f9aa61fde3293caa88597f58ad389cc' 
  AND (
    token = 'lqs0jOElyr4zuhwvxL9FQXD1SHRK4IBsQv7yqSAqd28=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014