UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xC19D8bc6e7YLb38zNsViB8ELb4WiZg/VGN+LOdkzIg=' 
WHERE 
  key_id = 'ec0955437887b90dab66c617fd79836a6ea54e8df7836625104b220173833728' 
  AND (
    token = 'xC19D8bc6e7YLb38zNsViB8ELb4WiZg/VGN+LOdkzIg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034