UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DG22J4o7PVN6JkdoPDIkBQIdKUlBgX4T5EEleQgbxuA=' 
WHERE 
  key_id = 'dfe5653cb7a284da04d83365887c485eca6cffb511d80ac90fd2846d2221138b' 
  AND (
    token = 'DG22J4o7PVN6JkdoPDIkBQIdKUlBgX4T5EEleQgbxuA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042