UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DJd5nM3B5OZOeTEuFSP/rRtXMWmb5/A/ivyTDBhadS4=' 
WHERE 
  key_id = '9fb7c95bdcd88e68e29eaeef18bc8c67a3fb9da99069a97f1ff5ea79d3907bc1' 
  AND (
    token = 'DJd5nM3B5OZOeTEuFSP/rRtXMWmb5/A/ivyTDBhadS4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027