UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/VRPIH6ffOOt7YUanRpSGhwl+cR1DZvvwhQyOahZBJw=' 
WHERE 
  key_id = '098586265b5a7d17dca468dd0677b66cc09d33044bcd974f730aed441a094ecd' 
  AND (
    token = '/VRPIH6ffOOt7YUanRpSGhwl+cR1DZvvwhQyOahZBJw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00056