UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'R/qqhWbNbv2J2t7iKz9kbi0vOZh33saiQ+DTglQxfSs=' 
WHERE 
  key_id = 'e35b084863fb224fdf7cb5081c3bd9311d779ae608d87b7b7a5b81e87b877c70' 
  AND (
    token = 'R/qqhWbNbv2J2t7iKz9kbi0vOZh33saiQ+DTglQxfSs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048