UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wkUKwiP6qFoeZfzETVrUIr3G+jqGnlJtdD3NpqPFMN8=' 
WHERE 
  key_id = 'a2d3c7a144ecdb4b1d569c209829196b71b9b8af31a9beb4242a373f99f10e59' 
  AND (
    token = 'wkUKwiP6qFoeZfzETVrUIr3G+jqGnlJtdD3NpqPFMN8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027